POV-Ray : Newsgroups : povray.general : Order of texture and pigment matter? : Order of texture and pigment matter? Server Time
30 Jul 2024 22:18:54 EDT (-0400)
  Order of texture and pigment matter?  
From: wealthychef
Date: 12 May 2008 18:25:00
Message: <web.4828c29b90917db34a296dd40@news.povray.org>
I don't understand something.  When I use the following code:

#declare testfinish = finish {ambient 0.7}

triangle {
    v0 v1 v2
    texture {
       pignment { color Red }
      testfinish
    }
}

 I get this error:
File: jaime.inc  Line: 94
File Context (5 lines):
    v0 v1 v2
    texture {
      pigment { color Red }
      testfinish
Parse Error: No matching } in 'texture', finish identifier found instead

But if I just switch the order of pigment and testfinish, as follows, the scene
renders as I expect:

triangle {
    v0 v1 v2
    texture {
      testfinish
      pigment { color Red }
        }
}

The same is true if I don't use the #declare, but just use the finish keyword
directly:

triangle {
    v0 v1 v2
    texture {
      pigment { color Red }
      finish {ambient 0.7}
        }
}


I've seen this kind of thing before and always "just make it work," but I'd love
to know what's actually happening here.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.